package com.example.zhunongzonghe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zn_order")
public class ZnOrder implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 订单表
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    /**
     * 订单号
     */
    @TableField("order_number")
    private String orderNumber;

    /**
     * 订单所属用户
     */
    @TableField("username")
    private String username;

    /**
     * 收货地址
     */
    @TableField("address_id")
    private Integer addressId;
    /**
     * 发货物流公司id
     */
    @TableField("logistics_id")
    private Integer logisticsId;
    /**
     * 快递单号
     */
    @TableField("courier_number")
    private String courierNumber;
    /**
     * 总金额
     */
    @TableField("total_price")
    private BigDecimal totalPrice;

    /**
     * 支付状态：支付状态：0为未支付，1为已支付，2为申请退款，3退款
     */
    @TableField("pay_status")
    private Integer payStatus;

    /**
     *
     * 0未发货，1为已发货，
     */
    @TableField("deliver_status")
    private Integer deliverStatus;

    /**
     * 收货状态
     * 0未收货，1为已收货，
     */
    @TableField("take_status")
    private Integer takeStatus;

    /**
     * 评价状态
     * 0未评价，1为已评价，
     */
    @TableField("evaluate_status")
    private Integer evaluateStatus;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;


}
